//---------------------------------------------------------------------------

#ifndef CLogH
#define CLogH
//---------------------------------------------------------------------------


#include <vcl.h>


#define TIMEOUT_LOGWAIT 5000

class CLog
{
public:

  CLog::CLog(TMemo *memomsg);
  CLog::~CLog();

  void LogMsg(int iDebugLevel, char *szMsg, ...);
  void LogMsg(char *szMsg, ...);

  int GetDebugLevel() {return LogDebugLevel;}
  void SetDebugLevel(int DbgLevel) { LogDebugLevel = DbgLevel;}
//  char *GetNameModule(){return szNameModule;}
  void LogMsgF(char *szMsg, ...);
  void DelLogFile();

private:
  char *szNameModule;
  int LogDebugLevel;

  char *GetCurrDateTime();
  bool WriteLog(char *szFileName, char *szLogLine);

  TMemo *m_MLogMsg;
  char  szNameLogFile[MAX_PATH];

  HANDLE hMutex;
};





























#endif
